package com.hefeng.example.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.hefeng.example.domain.CustomerManualWorkOrder;
import com.hefeng.example.domain.WorkOrderDispositionResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;
import java.util.Map;

@Mapper
public interface CustomerManualWorkOrderMapper extends BaseMapper<CustomerManualWorkOrder> {

    /**
     * 根据工单id获取设备信息
     *
     * @param id
     * @return
     */
    List<Map> WorkDeviceInfo(Integer id);

    IPage<CustomerManualWorkOrder> getDeviceList(IPage<CustomerManualWorkOrder> page, @Param(Constants.WRAPPER) Wrapper<CustomerManualWorkOrder> wrapper);

    /**
     * 获取处理中工单详情
     *
     * @param id
     * @return
     */
    List<Map> WorkOrderDetails(@Param(value = "id") String id);


    /**
     * 获取转单工单详情
     */

    List<Map> turnWork(@Param(value = "id") String id);


    /**
     * 已完成工单详情
     */

    List<Map> finishWork(@Param(value = "id") String id);

    /**
     * 添加结果
     *
     * @param workOrderDispositionResult
     * @return
     */
    int insertresult(@Param(value = "workOrderDispositionResult") WorkOrderDispositionResult workOrderDispositionResult);

    /**
     * 修改手动工单
     *
     * @param
     */
    void updateManual(@Param(value = "customerManualWorkOrder") CustomerManualWorkOrder customerManualWorkOrder);


    int inserthand(@Param(value = "customerManualWorkOrder") CustomerManualWorkOrder customerManualWorkOrder);
}
